revMoveToRecord
Type
command
Summary
Moves to the specified record in a record set.
Syntax
revMoveToRecord <recordSetId>, <recordNumber>
Description
Use the revMoveToRecord command to move around within the selected set of records.
If the command could not move to the specified record, then the value of the result function will be set to false, otherwise it will be set to true.
The revMoveToRecord command is currently supported by MySQL, PostgreSQL and SQLite. On ODBC, it will work providing that a forward only cursor has not been selected. For more information on ODBC Cursor types, please see the revOpenDatabase function. The revMoveToRecord command is not supported by Oracle at the moment and will just return false.
If you are using older database drivers (i.e. pre LiveCode 3.5), this command will not be supported. The error "revdberr,not supported by driver" will be thrown.
Parameters
Name | Type | Description |
---|---|---|
recordSetId | The number returned by the revQueryDatabase function when the record set was created. | |
recordNumber | The zero-based index of the record to move to (i.e. the first record is 0, the second is 1) |
Examples
revMoveToRecord tCursor, the menuHistory of button "Record Number"
revMoveToRecord tCursor, tCurrentRecord + kRecordsPerPage
Related
library: Database library
command: revMoveToPreviousRecord, revMoveToNextRecord
function: result, revOpenDatabase
glossary: function, record set
Compatibility and Support
Introduced
LiveCode 3.5
OS
mac
windows
linux
ios
android
Platforms
desktop
server
mobile